<%@page import="cn.sendto.service.ResidentInfoService"%>
<%@page import="cn.sendto.model.ResidentInfoModel"%>
<%@page import="cn.sendto.model.UserInfoModel"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8" errorPage="err.jsp"%>
	<jsp:include page="lock.jsp"></jsp:include>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/main.js"></script>
<title>头部页面</title>
<style>
body,html,div,table{
	margin: 0px;
	padding: 0px;
}
.logintopdiv {
	height: 50px;
	opacity: 0.7;
	text-align: left;
	font-size: 48px;
	color: blue;
}

a {
	text-decoration: none;
	color:black;
	font-weight: 15px;
}

.text {
	font-size: 20px;
}

.toptxt {
	font-size: 25px;
	color: black;
	font-weight: 15px;
}
/*nav-main*/
ul.nav-main {
	width: 100%;
	height: 100%;
	list-style-type: none
}

ul.nav-main span {
	display: inline-block;
	margin-left: 18px;
	height: 9px;
	background: url(img/sj1.png) no-repeat center center
}

/*图标向上旋转*/
.hover-up {
	transition-duration: .5s;
	transform: rotate(180deg);
	-webkit-transform: rotate(180deg);
}
/*图标向下旋转*/
.hover-down {
	transition-duration: .5s;
	transform: rotate(0);
	-webkit-transform: rotate(0)
}
/*导航条设置*/
ul.nav-main>li {
	text-align: center;
	width: 150px;
	height: 100%;
	display: block;
	float: right;
	color: black;
	font-weight: 15px;
	margin-right: 1px;
	cursor: pointer
}

ul.nav-main>li:hover {
	background: #ccc;
	color: #be4355
}

ul.nav-main>li:hover span {
	background: url(img/sg2.jpg) no-repeat center center;
	z-index: 100000;
}
/*隐藏盒子设置*/
div.hidden-box {
	width: 150px;
	position: absolute;
	display: none;
	background: #fff url(img/sj2.png) no-repeat top center;
	top: 35px;
	filter: alpha(opacity = 80);
	-moz-opacity: 0.8;
	opacity: 0.8;
}

.hidden-box>ul {
	list-style-type: none;
	color: #fff;
	cursor: pointer;
	padding-bottom: 15px
}

.hidden-box>ul li {
	line-height: 30px;
	height: 30px;
	font-weight: 500
}
/*.hidden-box li:hover{background:#643519;color:#fff}*/

/*隐藏盒子位置设置*/
.hidden-loc-index {
	right:417px
}
</style>
</head>

<body>
	<%
		String userName = "";
		String type = "";
		if (session.getAttribute("loginUser") != null) {
			UserInfoModel uim = (UserInfoModel) session.getAttribute("loginUser");
			userName = uim.getUserName();
			if (uim.getType() == 1) {
				type = "超级管理员";
			} else {
				type = "一般管理员";
			}
		} else if (session.getAttribute("loginResident") != null) {
			ResidentInfoModel rim = (ResidentInfoModel) session.getAttribute("loginResident");
			userName = rim.getUserName();
			type = "学生";
		}
	%>
	<div style="background: url('img/22.jpg') no-repeat; backgroubd-size:100% 100%;margin: 0px; padding: 0px;">
		<table width="100%" height="100px" >
			<tr height="15px;">
			<td rowspan="3" width="50px"></td>
				<td rowspan="3" width="400" class="logintopdiv"><img
					src="img/bg1.png" height="70px" width="60px" style="vertical-align: bottom;"><span style="vertical-align: middle;letter-spacing: 10px;">&nbsp;XF多媒体</span></td>
				<td>
					<ul class="nav-main">
			
						<li><a href="tologin.jsp" target="_top">注销</a></li>
						<li><a href="aboutus.jsp" target="right">关于我们</a></li>
						<li><a href="syshelp.jsp" target="right">系统帮助</a></li>
						<li id="li-1">个人资料</li>
								<%
					if(session.getAttribute("loginResident") != null){
					%>
					<li><a href="resident/resident.jsp" target="right"></a></li>
					<%
					}
					%>
						<li ><a href="right.jsp" target="right">返回首页</a></li>
					</ul> <!--隐藏盒子-->
				</td>
				
			</tr>
			<tr>
			<td>
			<div id="box-1" class="hidden-box hidden-loc-index">
				<ul>
					<li><a href="alterinfo.jsp" target="right">修改信息</a></li>
					<li><a href="alterpass.jsp" target="right">修改密码</a></li>
					
				</ul>
			</div>
			</td>
			</tr>
			<tr>
				<td class="text" valign="bottom" align="right">当前用户： <%=userName%>&nbsp;角色：<%=type%>
				</td>
			</tr>
			
		</table>
	</div>
</body>

</html>